Skip to content

tests: refactor header tests #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Conversation

nick-w-nick
Copy link
Contributor

I noticed that the header tests could theoretically be improved/refactored by moving the input/output logic into an array and then generating the tests using it.each().

I also added an empty value "" to the array test to ensure empty header value logic is properly tested for arrays.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.23%. Comparing base (9ebe124) to head (47fabfd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #4   +/-   ##
=======================================
  Coverage   10.23%   10.23%           
=======================================
  Files          21       21           
  Lines        3859     3859           
  Branches       79       79           
=======================================
  Hits          395      395           
  Misses       3460     3460           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi0 pi0 changed the title fix(tests): Improve header testing tests: refactor header tests Feb 6, 2025
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 merged commit 3f1640a into unjs:main Feb 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants